import 'package:flutter/cupertino.dart';
import 'package:vega/repo/api/Api.dart';
import 'package:vega/repo/model/home_list_model.dart';

class HomeViewModel with ChangeNotifier {
  List<HomeListData> listData = [];

  Future initHomeList() async {
    _getHomeList().then((value){
      listData.addAll(value ?? []);
      notifyListeners();
    });
  }

  Future<List<HomeListData>?> _getHomeList() async {
    List<HomeListData>? data = await Api.instance().homeList();
    return data;
  }
}